package com.alien.admin.modules.basic.domain;

import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Data
public class Deployment implements Serializable {
    private String name;
    private DeploymentStatus status;
    private DeploymentResource deploymentResource;


    @Data
    public static class DeploymentStatus implements Serializable {
        private Integer replicas;
        private Integer updatedReplicas;
        private Integer readyReplicas;
        private Integer availableReplicas;

        private List<DeploymentStatusCondition> conditions = new ArrayList<>(2);
    }

    @Data
    public static class DeploymentStatusCondition implements Serializable {
        private String type;
        private Boolean status;
        private String lastUpdateTime;
        private String lastTransitionTime;
        private String reason;
        private String message;
    }

    @Data
    public static class DeploymentResource implements Serializable {
        private String requestCpu;
        private String requestMem;
        private String limitCpu;
        private String limitMem;
    }
}
